Optimal. Leaf size=254 \[ -\frac{8 (20 A-83 B+216 C) \tan (c+d x)}{105 a^4 d}+\frac{(2 A-8 B+21 C) \tanh ^{-1}(\sin (c+d x))}{2 a^4 d}-\frac{(10 A-52 B+129 C) \tan (c+d x) \sec ^3(c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}-\frac{4 (20 A-83 B+216 C) \tan (c+d x) \sec ^2(c+d x)}{105 a^4 d (\sec (c+d x)+1)}+\frac{(2 A-8 B+21 C) \tan (c+d x) \sec (c+d x)}{2 a^4 d}-\frac{(A-B+C) \tan (c+d x) \sec ^5(c+d x)}{7 d (a \sec (c+d x)+a)^4}+\frac{(B-2 C) \tan (c+d x) \sec ^4(c+d x)}{5 a d (a \sec (c+d x)+a)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.689982, antiderivative size = 254, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.171, Rules used = {4084, 4019, 3787, 3767, 8, 3768, 3770} \[ -\frac{8 (20 A-83 B+216 C) \tan (c+d x)}{105 a^4 d}+\frac{(2 A-8 B+21 C) \tanh ^{-1}(\sin (c+d x))}{2 a^4 d}-\frac{(10 A-52 B+129 C) \tan (c+d x) \sec ^3(c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}-\frac{4 (20 A-83 B+216 C) \tan (c+d x) \sec ^2(c+d x)}{105 a^4 d (\sec (c+d x)+1)}+\frac{(2 A-8 B+21 C) \tan (c+d x) \sec (c+d x)}{2 a^4 d}-\frac{(A-B+C) \tan (c+d x) \sec ^5(c+d x)}{7 d (a \sec (c+d x)+a)^4}+\frac{(B-2 C) \tan (c+d x) \sec ^4(c+d x)}{5 a d (a \sec (c+d x)+a)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4084
Rule 4019
Rule 3787
Rule 3767
Rule 8
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \frac{\sec ^5(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^4} \, dx &=-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{\int \frac{\sec ^5(c+d x) (a (2 A+5 B-5 C)+a (2 A-2 B+9 C) \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx}{7 a^2}\\ &=-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(B-2 C) \sec ^4(c+d x) \tan (c+d x)}{5 a d (a+a \sec (c+d x))^3}+\frac{\int \frac{\sec ^4(c+d x) \left (28 a^2 (B-2 C)+a^2 (10 A-24 B+73 C) \sec (c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx}{35 a^4}\\ &=-\frac{(10 A-52 B+129 C) \sec ^3(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(B-2 C) \sec ^4(c+d x) \tan (c+d x)}{5 a d (a+a \sec (c+d x))^3}+\frac{\int \frac{\sec ^3(c+d x) \left (-3 a^3 (10 A-52 B+129 C)+a^3 (50 A-176 B+477 C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{105 a^6}\\ &=-\frac{(10 A-52 B+129 C) \sec ^3(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(B-2 C) \sec ^4(c+d x) \tan (c+d x)}{5 a d (a+a \sec (c+d x))^3}-\frac{4 (20 A-83 B+216 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \left (a^4+a^4 \sec (c+d x)\right )}+\frac{\int \sec ^2(c+d x) \left (-8 a^4 (20 A-83 B+216 C)+105 a^4 (2 A-8 B+21 C) \sec (c+d x)\right ) \, dx}{105 a^8}\\ &=-\frac{(10 A-52 B+129 C) \sec ^3(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(B-2 C) \sec ^4(c+d x) \tan (c+d x)}{5 a d (a+a \sec (c+d x))^3}-\frac{4 (20 A-83 B+216 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \left (a^4+a^4 \sec (c+d x)\right )}+\frac{(2 A-8 B+21 C) \int \sec ^3(c+d x) \, dx}{a^4}-\frac{(8 (20 A-83 B+216 C)) \int \sec ^2(c+d x) \, dx}{105 a^4}\\ &=\frac{(2 A-8 B+21 C) \sec (c+d x) \tan (c+d x)}{2 a^4 d}-\frac{(10 A-52 B+129 C) \sec ^3(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(B-2 C) \sec ^4(c+d x) \tan (c+d x)}{5 a d (a+a \sec (c+d x))^3}-\frac{4 (20 A-83 B+216 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \left (a^4+a^4 \sec (c+d x)\right )}+\frac{(2 A-8 B+21 C) \int \sec (c+d x) \, dx}{2 a^4}+\frac{(8 (20 A-83 B+216 C)) \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{105 a^4 d}\\ &=\frac{(2 A-8 B+21 C) \tanh ^{-1}(\sin (c+d x))}{2 a^4 d}-\frac{8 (20 A-83 B+216 C) \tan (c+d x)}{105 a^4 d}+\frac{(2 A-8 B+21 C) \sec (c+d x) \tan (c+d x)}{2 a^4 d}-\frac{(10 A-52 B+129 C) \sec ^3(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^5(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(B-2 C) \sec ^4(c+d x) \tan (c+d x)}{5 a d (a+a \sec (c+d x))^3}-\frac{4 (20 A-83 B+216 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \left (a^4+a^4 \sec (c+d x)\right )}\\ \end{align*}
Mathematica [B] time = 6.47611, size = 1322, normalized size = 5.2 \[ \text{result too large to display} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.086, size = 493, normalized size = 1.9 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.00343, size = 751, normalized size = 2.96 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.547221, size = 1062, normalized size = 4.18 \begin{align*} \frac{105 \,{\left ({\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{6} + 4 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{5} + 6 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{4} + 4 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{3} +{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \,{\left ({\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{6} + 4 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{5} + 6 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{4} + 4 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{3} +{\left (2 \, A - 8 \, B + 21 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \,{\left (16 \,{\left (20 \, A - 83 \, B + 216 \, C\right )} \cos \left (d x + c\right )^{5} +{\left (1070 \, A - 4472 \, B + 11619 \, C\right )} \cos \left (d x + c\right )^{4} + 4 \,{\left (310 \, A - 1318 \, B + 3411 \, C\right )} \cos \left (d x + c\right )^{3} + 4 \,{\left (130 \, A - 592 \, B + 1509 \, C\right )} \cos \left (d x + c\right )^{2} - 210 \,{\left (B - 2 \, C\right )} \cos \left (d x + c\right ) - 105 \, C\right )} \sin \left (d x + c\right )}{420 \,{\left (a^{4} d \cos \left (d x + c\right )^{6} + 4 \, a^{4} d \cos \left (d x + c\right )^{5} + 6 \, a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + a^{4} d \cos \left (d x + c\right )^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{A \sec ^{5}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{B \sec ^{6}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{C \sec ^{7}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec{\left (c + d x \right )} + 1}\, dx}{a^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32497, size = 458, normalized size = 1.8 \begin{align*} \frac{\frac{420 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac{420 \,{\left (2 \, A - 8 \, B + 21 \, C\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{4}} - \frac{840 \,{\left (2 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 9 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 7 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{2} a^{4}} - \frac{15 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} - 15 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 15 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 105 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 147 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 189 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 385 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 805 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 1365 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 1575 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 5145 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 11655 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{28}}}{840 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]